package com.ruoyi.zhgd.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;


/**
 * 沥青拌合站数据视图对象 n_asphalt_data_sieve
 *
 * @author zyb
 * @date 2023-09-06
 */
@Data
@ExcelIgnoreUnannotated
public class NAsphaltProduceSievePassRateVo {

    private static final long serialVersionUID = 1L;

    private String deptId;
    private String deptName;

    /**
     * 生产时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date dischargeTime;

    /**
     * 筛孔通过率
     */
    private Double value;

    /**
     * 前三天筛孔通过率均值
     */
    private Double threeDaysValue;

    /**
     * 均差
     */
    private Double difference;

    private String stationName;

    public Double getDifference() {
        if (null != value && null != threeDaysValue) {
            difference = value - threeDaysValue;
        } else {
            difference = null;
        }
        return difference;
    }
}
